Optimal. Leaf size=138 \[ \frac {2 \sqrt {2} a^3 \sqrt {d} \text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {4 a^3 \sqrt {d \tan (e+f x)}}{f}+\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3647, 3711,
3609, 3613, 211} \begin {gather*} \frac {2 \sqrt {2} a^3 \sqrt {d} \text {ArcTan}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {4 a^3 \sqrt {d \tan (e+f x)}}{f}+\frac {2 \left (a^3 \tan (e+f x)+a^3\right ) (d \tan (e+f x))^{3/2}}{5 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3609
Rule 3613
Rule 3647
Rule 3711
Rubi steps
\begin {align*} \int \sqrt {d \tan (e+f x)} (a+a \tan (e+f x))^3 \, dx &=\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f}+\frac {2 \int \sqrt {d \tan (e+f x)} \left (a^3 d+5 a^3 d \tan (e+f x)+6 a^3 d \tan ^2(e+f x)\right ) \, dx}{5 d}\\ &=\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f}+\frac {2 \int \sqrt {d \tan (e+f x)} \left (-5 a^3 d+5 a^3 d \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac {4 a^3 \sqrt {d \tan (e+f x)}}{f}+\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f}+\frac {2 \int \frac {-5 a^3 d^2-5 a^3 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{5 d}\\ &=\frac {4 a^3 \sqrt {d \tan (e+f x)}}{f}+\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f}-\frac {\left (20 a^6 d^3\right ) \text {Subst}\left (\int \frac {1}{50 a^6 d^4+d x^2} \, dx,x,\frac {-5 a^3 d^2+5 a^3 d^2 \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {2} a^3 \sqrt {d} \tan ^{-1}\left (\frac {\sqrt {d}-\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {4 a^3 \sqrt {d \tan (e+f x)}}{f}+\frac {8 a^3 (d \tan (e+f x))^{3/2}}{5 d f}+\frac {2 (d \tan (e+f x))^{3/2} \left (a^3+a^3 \tan (e+f x)\right )}{5 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 1.84, size = 315, normalized size = 2.28 \begin {gather*} \frac {a^3 \cos (e+f x) \left (3 \left (10 \sqrt {2} \text {ArcTan}\left (1-\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^2(e+f x)-10 \sqrt {2} \text {ArcTan}\left (1+\sqrt {2} \sqrt {\tan (e+f x)}\right ) \cos ^2(e+f x)+5 \sqrt {2} \cos ^2(e+f x) \log \left (1-\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )-5 \sqrt {2} \cos ^2(e+f x) \log \left (1+\sqrt {2} \sqrt {\tan (e+f x)}+\tan (e+f x)\right )+40 \cos ^2(e+f x) \sqrt {\tan (e+f x)}+4 \sin ^2(e+f x) \sqrt {\tan (e+f x)}+10 \sin (2 (e+f x)) \sqrt {\tan (e+f x)}\right )-20 \, _2F_1\left (\frac {3}{4},1;\frac {7}{4};-\tan ^2(e+f x)\right ) \sin (2 (e+f x)) \sqrt {\tan (e+f x)}\right ) \sqrt {d \tan (e+f x)} (1+\tan (e+f x))^3}{30 f (\cos (e+f x)+\sin (e+f x))^3 \sqrt {\tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(322\) vs.
\(2(117)=234\).
time = 0.33, size = 323, normalized size = 2.34
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}+2 d^{2} \sqrt {d \tan \left (f x +e \right )}-2 d^{3} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(323\) |
default | \(\frac {2 a^{3} \left (\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+d \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}+2 d^{2} \sqrt {d \tan \left (f x +e \right )}-2 d^{3} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(323\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 149, normalized size = 1.08 \begin {gather*} -\frac {2 \, {\left (5 \, a^{3} d^{2} {\left (\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}}\right )} - \frac {\left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{3} + 5 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{3} d + 10 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{2}}{d}\right )}}{5 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.09, size = 231, normalized size = 1.67 \begin {gather*} \left [\frac {5 \, \sqrt {2} a^{3} \sqrt {-d} \log \left (\frac {d \tan \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) - 1\right )} - 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left (a^{3} \tan \left (f x + e\right )^{2} + 5 \, a^{3} \tan \left (f x + e\right ) + 10 \, a^{3}\right )} \sqrt {d \tan \left (f x + e\right )}}{5 \, f}, -\frac {2 \, {\left (5 \, \sqrt {2} a^{3} \sqrt {d} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {d} \tan \left (f x + e\right )}\right ) - {\left (a^{3} \tan \left (f x + e\right )^{2} + 5 \, a^{3} \tan \left (f x + e\right ) + 10 \, a^{3}\right )} \sqrt {d \tan \left (f x + e\right )}\right )}}{5 \, f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int \sqrt {d \tan {\left (e + f x \right )}}\, dx + \int 3 \sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}\, dx + \int 3 \sqrt {d \tan {\left (e + f x \right )}} \tan ^{2}{\left (e + f x \right )}\, dx + \int \sqrt {d \tan {\left (e + f x \right )}} \tan ^{3}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 344 vs.
\(2 (124) = 248\).
time = 0.73, size = 344, normalized size = 2.49 \begin {gather*} -\frac {\sqrt {2} {\left (a^{3} d \sqrt {{\left | d \right |}} - a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, d f} + \frac {\sqrt {2} {\left (a^{3} d \sqrt {{\left | d \right |}} - a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{2 \, d f} - \frac {{\left (\sqrt {2} a^{3} d \sqrt {{\left | d \right |}} + \sqrt {2} a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d f} - \frac {{\left (\sqrt {2} a^{3} d \sqrt {{\left | d \right |}} + \sqrt {2} a^{3} {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{d f} + \frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4} \tan \left (f x + e\right )^{2} + 5 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4} \tan \left (f x + e\right ) + 10 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{10} f^{4}\right )}}{5 \, d^{10} f^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.62, size = 137, normalized size = 0.99 \begin {gather*} \frac {4\,a^3\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}+\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{d\,f}+\frac {2\,a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}}{5\,d^2\,f}-\frac {\sqrt {2}\,a^3\,\sqrt {d}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}\right )+2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{2\,\sqrt {d}}+\frac {\sqrt {2}\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{2\,d^{3/2}}\right )\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________